package com.yhl.admin.controller;

import com.yhl.admin.bean.Student;
import com.yhl.admin.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author yhl
 * @create 2021-06-27 23:09
 */
@Controller
public class StudentController {

    @Autowired
    private StudentService studentService;


    @ResponseBody
    @GetMapping("/getst")
    public Student getStudent(@RequestParam("id")int id){

        Student student = studentService.getStudent(id);

        return student;
    }
}
